Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add cmd line arg to suppress header output #29669

Open
wants to merge 1 commit into
base: next
Choose a base branch
from

Conversation

tophmatthews
Copy link
Contributor

@tophmatthews tophmatthews commented Jan 9, 2025

Combined #29663 into this. Changed the header output stream to _console, and added command line arg to suppress header output. Added command line arg to MooseTestApp to optionally print a header to allow testing.

Closes #29662

@tophmatthews tophmatthews force-pushed the header_suppress_29662 branch from ca8cd71 to 1c1b30b Compare January 9, 2025 16:44
@@ -247,6 +247,10 @@ MooseApp::validParams()
"Continue the calculation. Without <file base>, the most recent recovery file will be used");
params.setGlobalCommandLineParam("recover");

params.addCommandLineParam<bool>(
"suppress_header", "--suppress-header", "Flag to print the App header");
params.setGlobalCommandLineParam("suppress_header");
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ugh, this comment got stuck in "review", sorry it didn't go out...anyways, heres the command line and old comment...

@loganharbour This PR builds on #29663 , so it's a bit convoluted with that update, but here is the cmd line I'm trying to add. I would like to be able to optionally suppress the header being printed. I tried to use CommonOutputAction, similar to #29665, but it's not built at this point (I think?).

@moosebuild
Copy link
Contributor

moosebuild commented Jan 9, 2025

Job Coverage, step Generate coverage on 106a83b wanted to post the following:

Framework coverage

e193a3 #29669 106a83
Total Total +/- New
Rate 85.25% 85.26% +0.00% 100.00%
Hits 108024 108027 +3 5
Misses 18686 18683 -3 0

Diff coverage report

Full coverage report

Modules coverage

Coverage did not change

Full coverage reports

Reports

This comment will be updated on new commits.

@tophmatthews tophmatthews mentioned this pull request Jan 9, 2025
@tophmatthews tophmatthews force-pushed the header_suppress_29662 branch 2 times, most recently from e25f75a to 3ba6e2e Compare January 9, 2025 21:01
@tophmatthews tophmatthews marked this pull request as ready for review January 9, 2025 21:10
@tophmatthews
Copy link
Contributor Author

tophmatthews commented Jan 9, 2025

Can someone pass judgement on including a test on this @GiudGiud @loganharbour @pbehne ? The simplest is a header() in MooseTestApp like 9e54f63

@loganharbour
Copy link
Member

Can someone pass judgement on including a test on this @GiudGiud @loganharbour @pbehne ? The simplest is a header() in MooseTestApp like 9e54f63

I think we should just make another dummy app for it so that we don't get a header in every moose_test-opt run

@tophmatthews
Copy link
Contributor Author

Could also put a header in MiscApp

@loganharbour
Copy link
Member

Could also put a header in MiscApp

I don't like testing framework content outside of the framework. misc testing doesn't contribute to framework coverage for example.

If we don't want another app, we can just do something silly like --test-set-header="foo" in MooseTestApp and then have header() return that result. So the header only shows up when we set it to. Goofy cause we'll basically have

--suppress-header --test-set-header="foo"

but we've done worse.

@moosebuild
Copy link
Contributor

moosebuild commented Jan 9, 2025

Job Documentation, step Docs: sync website on 106a83b wanted to post the following:

View the site here

This comment will be updated on new commits.

@tophmatthews
Copy link
Contributor Author

tophmatthews commented Jan 10, 2025

--test-set-header="foo"

Nice! I like this option! I kinda need the fix for setGlobalCommandLineParam @loganharbour is working on to cascade to all subapp levels first to do it right, but I'll whip something up before that fix is done.

@tophmatthews
Copy link
Contributor Author

Pretty easy to put

  params.addCommandLineParam<std::string>(
      "append_header", "--append_header <header>", "String to print at top of console output");

in MooseApp.C too for someone that may want that optoin...any reason to or just leave it in MooseTestApp.C?

@GiudGiud
Copy link
Contributor

It's not very useful imo

@tophmatthews tophmatthews force-pushed the header_suppress_29662 branch from 3ba6e2e to 106a83b Compare January 10, 2025 18:04
@tophmatthews
Copy link
Contributor Author

This works for cascading to subapps @loganharbour ...maybe that previous fix you suggested did work 😬

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

use _console for app header
4 participants